package com.gqz.equip.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gqz.common.core.domain.R;
import com.gqz.common.core.domain.RequestForm;
import com.gqz.equip.api.TEnWzCrkOrderApi;
import com.gqz.equip.service.ITEnWzCrkOrderService;
import com.gqz.equip.vo.TEnWzCrkOrderListVo;
import com.gqz.equip.vo.TEnWzCrkOrderVo;
import jakarta.validation.Valid;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


/**
 * 新能源-物资-出入库工单表 Controller
 *
 * @Version 1.0
 * @Author input you name
 */
@RestController
public class TEnWzCrkOrderController implements TEnWzCrkOrderApi {

    @Autowired
    private ITEnWzCrkOrderService service;

    @Override
    public R<List<TEnWzCrkOrderVo>> getById(@Valid String id) {
        return R.ok(service.getById(id));
    }

    @Override
    public R<Page<TEnWzCrkOrderVo>> page(@Valid RequestForm<TEnWzCrkOrderVo> requestForm) {
        return R.ok(service.page(requestForm));
    }

    @Override
    public R<Page<TEnWzCrkOrderVo>> shPage(@Valid RequestForm<TEnWzCrkOrderVo> requestForm) {
        return R.ok(service.shPage(requestForm));
    }

    @Override
    public R<Long> count(@Valid RequestForm<TEnWzCrkOrderVo> requestForm) {
        return R.ok(service.count(requestForm));
    }

    @Override
    public R<Integer> insert(TEnWzCrkOrderListVo vos) {
        return R.ok(service.insert(vos));
    }

    @Override
    public R<Integer> update(TEnWzCrkOrderListVo vos) {
        return R.ok(service.update(vos));
    }

    @Override
    public R<Object> getDjbh() {
        return R.ok(service.getDjbh());
    }

    @Override
    public R<Integer> deleteByIds(@Valid String[] ids) {
        return R.ok(service.deleteByIds(ids));
    }

    @Override
    public R<Integer> submitShByIds(@Valid String[] ids) {
        return R.ok(service.submitShByIds(ids));
    }

    @Override
    public R<Integer> shDj(TEnWzCrkOrderVo vos) {
        return R.ok(service.shDj(vos));
    }
}
